<div class="layui-container fly-marginTop">
    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief" lay-filter="user">
            <ul class="layui-tab-title">
                <li class="layui-this">找回密码</li>
            </ul>
            <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form layui-form-pane">
                        <form method="post">

                        <!-- 关键词来区分是哪一个表单的提交 -->
                        <input type="hidden" name="action" value="retrieve" />


                            <!-- 邮箱 -->
                            <div class="layui-form-item">
                                <label for="email" class="layui-form-label">邮箱</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="email" name="email" required placeholder="请输入邮箱地址"
                                        class="layui-input" value="" readonly>
                                </div>
                            </div>

                            <!-- 密码 -->
                            <div class="layui-form-item">
                                <label for="password" class="layui-form-label">重设密码</label>
                                <div class="layui-input-inline">
                                    <input type="password" id="password" name="password" required lay-verify="required" autocomplete="off"
                                        class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">6到16个字符</div>
                            </div>

                            <!-- 确认密码 -->
                            <div class="layui-form-item">
                                <label for="repass" class="layui-form-label">确认密码</label>
                                <div class="layui-input-inline">
                                    <input type="password" id="repass" name="repass" required lay-verify="required" autocomplete="off"
                                        class="layui-input">
                                </div>
                            </div>

                            <!-- 验证码 -->
                            <div class="layui-form-item">
                                <label for="L_vercode" class="layui-form-label">验证码</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_vercode" name="vercode" required placeholder="请输入验证码"
                                        class="layui-input">
                                </div>
                                <div class="layui-input-inline">
                                    <img src="{:url('home/index/vercode')}" style="width:150px;height:40px;"
                                        onclick="this.src=`{:url('home/index/vercode')}`">
                                </div>

                            </div>
                            <!-- 提交按钮 -->
                            <div class="layui-form-item">
                                <button class="layui-btn">重新设置密码</button>
                            </div>

                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
<script>
    layui.use(['form', 'jquery'], function () {
        var $ = layui.jquery

        //----用途*----用来接受地址栏的参数
        var urlinfo = window.location.href;               //获取当前的页面url
        var len = urlinfo.length;                         //当前页面地址的长度
        var offset = urlinfo.indexOf("?");                //设置参数字符串开始的位置
        var newsidinfo = urlinfo.substring(offset.len)    //取出参数字符串 这里会获取到类似id=1的字符串
        var newsids = newsidinfo.split("=");              //对获取的参数字符型按照"="进行分割
        var newid1 = newsids[1];                          //获取到等号后面的值也就是需要的参数值
        var newid0 = newsids[0];                          //获取到等号前面的值也就是需要的参数名

        $('#email').val(newid1)
    })
</script>